﻿//01.Write a program to convert decimal numbers to their binary representation.

using System;
using System.Collections.Generic;

namespace NumeralSystems
{
    class DecimalToBinary
    {
        static void Main()
        {
            Console.Write("Enter your number: ");
            string num = Console.ReadLine();
            int number = int.Parse(num);

            int devided = 0;
            List<int> reminder = new List<int>();

            for (int i = 0; number > 0; i++)
            {
                devided = number / 2;
                reminder.Add(number % 2);
                number = devided;
            }

            for (int i = reminder.Count-1; i >= 0; i--)
            {
                Console.Write(reminder[i]);
            }
            Console.WriteLine();
        }
    }
}
